package com.jiemengshi.server.mapper;

import com.jiemengshi.server.model.UserAdmin;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Transactional
public interface UserAdminMapper {
    int deleteByPrimaryKey(Integer id);

    int deleteByUsername(String username);
    
    int insert(UserAdmin record);

    int insertSelective(UserAdmin record);

    UserAdmin selectByPrimaryKey(Integer id);

    UserAdmin selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
    
    int updateByPrimaryKeySelective(UserAdmin record);

    int updateByPrimaryKey(UserAdmin record);

    int updateLoginTime(@Param("id") int id, @Param("lastLogin") String lastLogin);
}